<?php  
	header("Content-type:text/html;charset=utf-8");

	$pdo = new PDO("mysql:host=localhost;dbname=district","root","123456");
	$pdo->exec("set names utf8");

	$sql = "select * from district where upid=?";
	$list = $pdo->prepare($sql);

	//绑定值
	$list->bindValue(1,$_GET['upid']);
	//执行
	$list->execute();

	$arr = $list->fetchAll(PDO::FETCH_ASSOC);

	echo json_encode($arr);

	// var_dump($arr);

?>